package whf.framework.aop;

import java.lang.reflect.Method;

import whf.framework.service.Service;

/**
 * @author wanghaifeng
 *
 */
public class MethodBeforeAdvice implements org.springframework.aop.MethodBeforeAdvice {
	public static ThreadLocal<Long> threadLocal = new ThreadLocal<Long>();
	/* (non-Javadoc)
	 * @see org.springframework.aop.MethodBeforeAdvice#before(java.lang.reflect.Method, java.lang.Object[], java.lang.Object)
	 */
	public void before(Method method, Object[] args, Object target)
			throws Throwable {
		if(target instanceof Service){
			threadLocal.set(System.currentTimeMillis());
		}
	}

}
